﻿export default [
  {
    path: '/user',
    component: '@/chaos/layouts/UserLayout',
    routes: [
      {
        name: '登录',
        path: '/user/login',
        component: '@/pages/user/login',
      },
    ],
  },
  {
    path: '/',
    component: '@/chaos/layouts/SecurityLayout',
    routes: [
      {
        path: '/',
        component: '@/chaos/layouts/BasicLayout',
        authority: ['ADMIN', 'CHAN'],
        routes: [
          {
            path: '/',
            redirect: '/welcome',
          },
          {
            path: '/welcome',
            name: '欢迎',
            icon: 'smile',
            component: '@/chaos/pages/welcome',
          },
          {
            name: '字典管理',
            icon: 'usergroupAdd',
            path: '/dicts',
            component: '@/pages/dicts',
            authority: ['ADMIN'],
          },
          {
            name: '渠道管理',
            icon: 'usergroupAdd',
            path: '/platforms',
            component: '@/pages/platforms',
            authority: ['ADMIN'],
          },
          {
            name: '资源管理',
            icon: 'usergroupAdd',
            path: '/resouces',
            component: '@/pages/resouces',
            authority: ['ADMIN'],
          },
          {
            name: '关联渠道',
            icon: 'usergroupAdd',
            path: '/admins',
            component: '@/pages/admins',
            authority: ['ADMIN'],
          },
          {
            name: '订单列表',
            icon: 'usergroupAdd',
            path: '/orders',
            component: '@/pages/orders',
            authority: ['ADMIN', 'CHAN'],
          },
          {
            name: '数据统计',
            icon: 'usergroupAdd',
            path: '/statistics',
            component: '@/pages/statistics',
            authority: ['ADMIN'],
          },
          {
            name: '线索管理',
            icon: 'usergroupAdd',
            path: '/clues',
            component: '@/pages/clues',
            authority: ['ADMIN'],
          },
          {
            name: '用户详情',
            hideInMenu: true,
            path: '/clues/detail',
            component: '@/pages/clues/detail',
            authority: ['ADMIN']
          },
          {
            component: '@/chaos/pages/404',
          },
        ],
      },
      {
        component: '@/chaos/pages/404',
      },
    ],
  },
  {
    component: '@/chaos/pages/404',
  },
];
